<?php
/*Problem Domain
To create a class that represents a Profile of a user in the TMS
*/

/*
- Profile is new Profile(int, String, String, String, Date, Date, String)
- interp. new Profile(user_id, name, address, dob, doj, college) represents the Profile of a User of the system and extends 
the existing User class of the system where
	- user_id represents the user ID of the User from the User class
	- name is the first.last name of the User Profile.
	- address is the address of the User Profile.
	- dob is the date of birth of the User Profile.
	- doj is the date of joining of the User Profile.
	- college is the college of the User Profile

- Example.
$usr1 = new User(1, null, 'msayyed456@gmail.com', 'mohsin', 'trainee');

$pf1 = new Profile($usr1.getId(), 'mohsin', 'sayyed', 'dhanori', '1992-08-07', '2014-10-22', 'fc');

-Template.
function fn-for-Profile()
{
	...parent.getId();	//int
	...$this->name;		//String
	...$this->address;	//String
	...$this->dob;		//Date
	...$this->doj;		//Date
	...$this->college;	//String
}
*/
include_once 'User.php';

class Profile extends User
{
	private $name;
	private $address;
	private $dob;
	private $doj;
	private $college;

	/*int, String, String, String, String, String
	purpose. initializes the newly created User Profile*/
	public function __construct($user_id, $emp_id, $name, $address, $dob, $doj, $college)
	{
		parent::setId($user_id);
		parent::setEmpId($emp_id);
		$this->name       = $name;
		$this->address    = $address;
		$this->dob        = $dob;
		$this->doj        = $doj;
		$this->college    = $college;
	}

	/*void -> String
	purpose. produces the first name of the current User Profile*/
	public function getName()
	{
		return $this->name;
	}

        /*String -> void
        purpose. sets the given name for the current User Profile*/
        public function setName($name)
        {
                $this->name = $name;
        }

	/*void -> String
        purpose. produces the address of the current User Profile*/
        public function getAddress()
        {
                return $this->address;
        }

        /*String -> void
        purpose. sets the given address for the current User Profile*/
        public function setAddress($address)
        {
                $this->address = $address;
        }

	/*void -> Date
        purpose. produces the date of birth  of the current User Profile*/
        public function getDateOfBirth()
        {
                return $this->dob;
        }

        /*Date -> void
        purpose. sets the given Date Of Birth for the current User Profile*/
        public function setDateOfBirth($dob)
        {
                $this->dob = $dob;
        }

	/*void -> Date
        purpose. produces the date of joining of the current User Profile*/
        public function getDateOfJoining()
        {
                return $this->doj;
        }

	/*void -> String
        purpose. produces the last College of the current User Profile*/
        public function getCollege()
        {
                return $this->college;
        }
}
?>
